<template>
  <div>
    <el-table
          :data="page.records"
          style="width: 80%;margin-top: 70px;margin-left: 70px;">
          <el-table-column
            prop="adminName"
            label="用户名"
            width="280">
          </el-table-column>
          <el-table-column
            prop="loginTime"
            label="登陆时间"
            width="280">
          </el-table-column>
          <el-table-column
            prop="ipAddress"
            label="ip地址"
            width="280">
          </el-table-column>
          <el-table-column
            prop="address"
            label="登录地址"
            width="280">
          </el-table-column>
        </el-table>
        <div class="block" style="margin-left: 70px;">
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :page-sizes="[10, 20, 30]"
              :page-size="10"
              layout="total, sizes, prev, pager, next, jumper"
              :total="page.total">
            </el-pagination>
          </div>
  </div>
</template>

<script>
  export default{
    name:"AdminLoginInfo",
    data(){
      return{
      pageNum:1,
      pageSize:10,
      page:{}
      }
    },
    methods:{
    loadAllAdminLoginInfo(){
    this.$http.get("/admin/adminLogin/loadAllAdminLogin",{
      params:{
        pageNum:this.pageNum,
        pageSize:this.pageSize
      }
    }).then(resp=>{
      this.page=resp.data.data
    })
    },
    handleSizeChange(val){
      this.pageSize=val
      this.loadAllAdminLoginInfo()
    },
    handleCurrentChange(val){
      this.pageNum=val
      this.loadAllAdminLoginInfo()
    }
    },
    created(){
      this.loadAllAdminLoginInfo()
    }
  }
</script>

<style>
</style>
